﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类bEntity
	/// </summary>
	[Serializable]
	public class bEntity : Entity 
	{ 
		 public bEntity() 
            : base("bEntity") 
        { 

        }


		#region Model
		private int _UID;
		private string _Code;
		private string _Short;
		private string _ChnName;
		private string _EngName;
		private string _Type;
		private string _Kind;
		private string _Business;
		private string _ChnAddr;
		private string _EngAddr;
		private string _Tel;
		private string _Fax;
		private string _Email;
		private string _ChnBank;
		private string _ChnAccountNo;
		private string _EngBank;
		private string _EngAccountNo;
		private int? _UserSalesID;
		private string _FromDate;
		private string _DestDate;
		private string _SettleNote;
		private string _SettleContacter;
		private string _SettleTel;
		private string _Title;
		private string _Note;
		private bool? _IsDisable;
		private bool? _IsSelect;
		private int? _UserCreateID;
		private string _CreateDate;
		private int? _UserModifyID;
		private string _ModifyDate;
		private int? _CurrencyID;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Code
		{
			get{ return _Code; }
			set
			{
				this.OnPropertyValueChange(_.Code,_Code,value);
				this._Code = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Short
		{
			get{ return _Short; }
			set
			{
				this.OnPropertyValueChange(_.Short,_Short,value);
				this._Short = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ChnName
		{
			get{ return _ChnName; }
			set
			{
				this.OnPropertyValueChange(_.ChnName,_ChnName,value);
				this._ChnName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string EngName
		{
			get{ return _EngName; }
			set
			{
				this.OnPropertyValueChange(_.EngName,_EngName,value);
				this._EngName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Type
		{
			get{ return _Type; }
			set
			{
				this.OnPropertyValueChange(_.Type,_Type,value);
				this._Type = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Kind
		{
			get{ return _Kind; }
			set
			{
				this.OnPropertyValueChange(_.Kind,_Kind,value);
				this._Kind = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Business
		{
			get{ return _Business; }
			set
			{
				this.OnPropertyValueChange(_.Business,_Business,value);
				this._Business = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ChnAddr
		{
			get{ return _ChnAddr; }
			set
			{
				this.OnPropertyValueChange(_.ChnAddr,_ChnAddr,value);
				this._ChnAddr = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string EngAddr
		{
			get{ return _EngAddr; }
			set
			{
				this.OnPropertyValueChange(_.EngAddr,_EngAddr,value);
				this._EngAddr = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Tel
		{
			get{ return _Tel; }
			set
			{
				this.OnPropertyValueChange(_.Tel,_Tel,value);
				this._Tel = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Fax
		{
			get{ return _Fax; }
			set
			{
				this.OnPropertyValueChange(_.Fax,_Fax,value);
				this._Fax = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Email
		{
			get{ return _Email; }
			set
			{
				this.OnPropertyValueChange(_.Email,_Email,value);
				this._Email = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ChnBank
		{
			get{ return _ChnBank; }
			set
			{
				this.OnPropertyValueChange(_.ChnBank,_ChnBank,value);
				this._ChnBank = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ChnAccountNo
		{
			get{ return _ChnAccountNo; }
			set
			{
				this.OnPropertyValueChange(_.ChnAccountNo,_ChnAccountNo,value);
				this._ChnAccountNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string EngBank
		{
			get{ return _EngBank; }
			set
			{
				this.OnPropertyValueChange(_.EngBank,_EngBank,value);
				this._EngBank = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string EngAccountNo
		{
			get{ return _EngAccountNo; }
			set
			{
				this.OnPropertyValueChange(_.EngAccountNo,_EngAccountNo,value);
				this._EngAccountNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserSalesID
		{
			get{ return _UserSalesID; }
			set
			{
				this.OnPropertyValueChange(_.UserSalesID,_UserSalesID,value);
				this._UserSalesID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string FromDate
		{
			get{ return _FromDate; }
			set
			{
				this.OnPropertyValueChange(_.FromDate,_FromDate,value);
				this._FromDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string DestDate
		{
			get{ return _DestDate; }
			set
			{
				this.OnPropertyValueChange(_.DestDate,_DestDate,value);
				this._DestDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string SettleNote
		{
			get{ return _SettleNote; }
			set
			{
				this.OnPropertyValueChange(_.SettleNote,_SettleNote,value);
				this._SettleNote = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string SettleContacter
		{
			get{ return _SettleContacter; }
			set
			{
				this.OnPropertyValueChange(_.SettleContacter,_SettleContacter,value);
				this._SettleContacter = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string SettleTel
		{
			get{ return _SettleTel; }
			set
			{
				this.OnPropertyValueChange(_.SettleTel,_SettleTel,value);
				this._SettleTel = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Title
		{
			get{ return _Title; }
			set
			{
				this.OnPropertyValueChange(_.Title,_Title,value);
				this._Title = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Note
		{
			get{ return _Note; }
			set
			{
				this.OnPropertyValueChange(_.Note,_Note,value);
				this._Note = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsDisable
		{
			get{ return _IsDisable; }
			set
			{
				this.OnPropertyValueChange(_.IsDisable,_IsDisable,value);
				this._IsDisable = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsSelect
		{
			get{ return _IsSelect; }
			set
			{
				this.OnPropertyValueChange(_.IsSelect,_IsSelect,value);
				this._IsSelect = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCreateID
		{
			get{ return _UserCreateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCreateID,_UserCreateID,value);
				this._UserCreateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserModifyID
		{
			get{ return _UserModifyID; }
			set
			{
				this.OnPropertyValueChange(_.UserModifyID,_UserModifyID,value);
				this._UserModifyID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModifyDate
		{
			get{ return _ModifyDate; }
			set
			{
				this.OnPropertyValueChange(_.ModifyDate,_ModifyDate,value);
				this._ModifyDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? CurrencyID
		{
			get{ return _CurrencyID; }
			set
			{
				this.OnPropertyValueChange(_.CurrencyID,_CurrencyID,value);
				this._CurrencyID = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取实体中的标识列
		/// </summary>
		public override Field GetIdentityField()
		{
			return _.UID;
		}
		/// <summary>
		/// 获取实体中的主键列
		/// </summary>
		public override Field[] GetPrimaryKeyFields()
		{
			return new Field[] {
				_.UID			};
		}
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.Code,
				_.Short,
				_.ChnName,
				_.EngName,
				_.Type,
				_.Kind,
				_.Business,
				_.ChnAddr,
				_.EngAddr,
				_.Tel,
				_.Fax,
				_.Email,
				_.ChnBank,
				_.ChnAccountNo,
				_.EngBank,
				_.EngAccountNo,
				_.UserSalesID,
				_.FromDate,
				_.DestDate,
				_.SettleNote,
				_.SettleContacter,
				_.SettleTel,
				_.Title,
				_.Note,
				_.IsDisable,
				_.IsSelect,
				_.UserCreateID,
				_.CreateDate,
				_.UserModifyID,
				_.ModifyDate,
				_.CurrencyID
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_Code,
				_Short,
				_ChnName,
				_EngName,
				_Type,
				_Kind,
				_Business,
				_ChnAddr,
				_EngAddr,
				_Tel,
				_Fax,
				_Email,
				_ChnBank,
				_ChnAccountNo,
				_EngBank,
				_EngAccountNo,
				_UserSalesID,
				_FromDate,
				_DestDate,
				_SettleNote,
				_SettleContacter,
				_SettleTel,
				_Title,
				_Note,
				_IsDisable,
				_IsSelect,
				_UserCreateID,
				_CreateDate,
				_UserModifyID,
				_ModifyDate,
				_CurrencyID
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "Code":
                    this._Code = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Short":
                    this._Short = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ChnName":
                    this._ChnName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "EngName":
                    this._EngName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Type":
                    this._Type = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Kind":
                    this._Kind = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Business":
                    this._Business = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ChnAddr":
                    this._ChnAddr = DataHelper.ConvertValue<string>(value);
                    break; 
				case "EngAddr":
                    this._EngAddr = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Tel":
                    this._Tel = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Fax":
                    this._Fax = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Email":
                    this._Email = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ChnBank":
                    this._ChnBank = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ChnAccountNo":
                    this._ChnAccountNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "EngBank":
                    this._EngBank = DataHelper.ConvertValue<string>(value);
                    break; 
				case "EngAccountNo":
                    this._EngAccountNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserSalesID":
                    this._UserSalesID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "FromDate":
                    this._FromDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "DestDate":
                    this._DestDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "SettleNote":
                    this._SettleNote = DataHelper.ConvertValue<string>(value);
                    break; 
				case "SettleContacter":
                    this._SettleContacter = DataHelper.ConvertValue<string>(value);
                    break; 
				case "SettleTel":
                    this._SettleTel = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Title":
                    this._Title = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Note":
                    this._Note = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsDisable":
                    this._IsDisable = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "IsSelect":
                    this._IsSelect = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserCreateID":
                    this._UserCreateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModifyID":
                    this._UserModifyID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ModifyDate":
                    this._ModifyDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CurrencyID":
                    this._CurrencyID = DataHelper.ConvertValue<int?>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "Code":
                    return this._Code; 
				case "Short":
                    return this._Short; 
				case "ChnName":
                    return this._ChnName; 
				case "EngName":
                    return this._EngName; 
				case "Type":
                    return this._Type; 
				case "Kind":
                    return this._Kind; 
				case "Business":
                    return this._Business; 
				case "ChnAddr":
                    return this._ChnAddr; 
				case "EngAddr":
                    return this._EngAddr; 
				case "Tel":
                    return this._Tel; 
				case "Fax":
                    return this._Fax; 
				case "Email":
                    return this._Email; 
				case "ChnBank":
                    return this._ChnBank; 
				case "ChnAccountNo":
                    return this._ChnAccountNo; 
				case "EngBank":
                    return this._EngBank; 
				case "EngAccountNo":
                    return this._EngAccountNo; 
				case "UserSalesID":
                    return this._UserSalesID; 
				case "FromDate":
                    return this._FromDate; 
				case "DestDate":
                    return this._DestDate; 
				case "SettleNote":
                    return this._SettleNote; 
				case "SettleContacter":
                    return this._SettleContacter; 
				case "SettleTel":
                    return this._SettleTel; 
				case "Title":
                    return this._Title; 
				case "Note":
                    return this._Note; 
				case "IsDisable":
                    return this._IsDisable; 
				case "IsSelect":
                    return this._IsSelect; 
				case "UserCreateID":
                    return this._UserCreateID; 
				case "CreateDate":
                    return this._CreateDate; 
				case "UserModifyID":
                    return this._UserModifyID; 
				case "ModifyDate":
                    return this._ModifyDate; 
				case "CurrencyID":
                    return this._CurrencyID; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","bEntity");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","bEntity","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Code = new Field("Code","bEntity","Code");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Short = new Field("Short","bEntity","Short");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ChnName = new Field("ChnName","bEntity","ChnName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field EngName = new Field("EngName","bEntity","EngName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Type = new Field("Type","bEntity","Type");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Kind = new Field("Kind","bEntity","Kind");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Business = new Field("Business","bEntity","Business");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ChnAddr = new Field("ChnAddr","bEntity","ChnAddr");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field EngAddr = new Field("EngAddr","bEntity","EngAddr");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Tel = new Field("Tel","bEntity","Tel");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Fax = new Field("Fax","bEntity","Fax");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Email = new Field("Email","bEntity","Email");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ChnBank = new Field("ChnBank","bEntity","ChnBank");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ChnAccountNo = new Field("ChnAccountNo","bEntity","ChnAccountNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field EngBank = new Field("EngBank","bEntity","EngBank");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field EngAccountNo = new Field("EngAccountNo","bEntity","EngAccountNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserSalesID = new Field("UserSalesID","bEntity","UserSalesID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FromDate = new Field("FromDate","bEntity","FromDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field DestDate = new Field("DestDate","bEntity","DestDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field SettleNote = new Field("SettleNote","bEntity","SettleNote");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field SettleContacter = new Field("SettleContacter","bEntity","SettleContacter");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field SettleTel = new Field("SettleTel","bEntity","SettleTel");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Title = new Field("Title","bEntity","Title");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Note = new Field("Note","bEntity","Note");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsDisable = new Field("IsDisable","bEntity","IsDisable");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsSelect = new Field("IsSelect","bEntity","IsSelect");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreateID = new Field("UserCreateID","bEntity","UserCreateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","bEntity","CreateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModifyID = new Field("UserModifyID","bEntity","UserModifyID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModifyDate = new Field("ModifyDate","bEntity","ModifyDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CurrencyID = new Field("CurrencyID","bEntity","CurrencyID");
		}
		#endregion

 
	}
}

